package com.wnxy.sddfp.client.bank.callback;

import com.wnxy.sddfp.client.bank.TradeLogApi;
import com.wnxy.sddfp.common.enums.BorrowRecordStatusDTO;
import com.wnxy.sddfp.common.model.dto.bank.BankCardAddDTO;
import com.wnxy.sddfp.common.model.dto.bank.SignatureDTO;
import com.wnxy.sddfp.common.model.dto.bid.BankBidDTO;
import com.wnxy.sddfp.common.model.vo.bid.LoanVo;
import com.wnxy.sddfp.common.model.vo.trade.BorrowRecordVo;
import com.wnxy.sddfp.common.result.Result;
import com.wnxy.sddfp.common.result.enums.impl.BusinessCode;
import org.springframework.stereotype.Component;

/**
 * 针对TradeLogApi接口的远程调用失败回调异常处理
 */
@Component
public class TradeLogApiCallback implements TradeLogApi {
    @Override
    public Result proxyBindCardLog(BankCardAddDTO bankCardAddDTO) {
        return Result.fail(BusinessCode.USER_CARD_BINDED_FEIGN_ERROR);
    }

    @Override
    public Result syncBorrowRecord(BorrowRecordVo borrowRecordVo) {
        return Result.fail(BusinessCode.BORROW_SYNC_ERROR);
    }

    @Override
    public Result getBidBalance(String userCode) {
        return Result.fail(BusinessCode.BID_BALANCE_ERROR);
    }

    @Override
    public Result addBankBidAgency(BankBidDTO bankBidDTO) {
        return Result.fail(BusinessCode.BID_AGENCY_ERROR);
    }

    @Override
    public Result confirmLoan(LoanVo loanVo) {
        return Result.fail("confirmLoan failed");
    }

    @Override
    public Result<String> updateBorrowRecordStatus(BorrowRecordStatusDTO brsDTO) {
        return Result.fail("confirmLoan failed");
    }
}
